#ifndef DS_V4L2_CAMERA_H
#define DS_V4L2_CAMERA_H

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <string.h>
#include <errno.h>
#include <sys/mman.h>
#include <linux/videodev2.h>
#include <linux/fb.h>
#include <pthread.h>
#include <stdbool.h>
#include "camera_use.h"
#include <stdint.h>
#include <stdbool.h>

#define PHOTO_PATH "/mywork/myphoto.rgb"
#define IMAGE_WIDTH 640
#define IMAGE_HEIGHT 480
#define FB_DEV "/dev/fb0"   // LCD设备节点
#define FRAMEBUFFER_COUNT 3 // 帧缓冲数量

int ds_v4l2_camera_init(void);
void v4l2_stream_off(void);
void close_v4l2_camera(void);
int capture_photo(void);
void display_photo(const char *photo_path, int width, int height);
int ds_v4l2_camera_thread_init(void);
int pause_v4l2_camera(void);
int resume_v4l2_camera(void);


#endif
